import http from "http"
const port =8888;
const server = http.createServer((req,res)=>{
    res.end(
        JSON.stringify([
            {
                id:1,
                name:"张三", 
            },
            {
                id:2,
                name:"李四",
            },
            {
                id:3,
                name:"王五",
            }
        ])
    )
})
server.listen(port,()=>{
    console.log(`服务器运行在http://localhost:${port}`)
})